class QuesTable:
    def __init__(self, db):
        self.db = db
        self.db.execute('''
            CREATE TABLE IF NOT EXISTS ques (
                id INTEGER PRIMARY KEY AUTOINCREMENT,
                paper_name TEXT NOT NULL,
                ques_type TEXT NOT NULL,
                content TEXT NOT NULL,
                content_img TEXT,
                choice_a TEXT ,
                choice_a_img TEXT,
                choice_b TEXT ,
                choice_b_img TEXT,
                choice_c TEXT ,
                choice_c_img TEXT,
                choice_d TEXT ,
                choice_d_img TEXT,
                answer TEXT NOT NULL,
                rating TEXT NOT NULL
            );
        ''')

    def insert_ques(self, paper_name, ques_type, content, content_img,
                 choice_a, choice_a_img, choice_b, choice_b_img, choice_c,
                 choice_c_img, choice_d, choice_d_img, answer, rating):
        self.db.execute("""
            INSERT INTO ques (
            paper_name, ques_type, content, content_img,
            choice_a, choice_a_img, choice_b, choice_b_img,
            choice_c,choice_c_img, choice_d, choice_d_img,
            answer, rating
             ) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?)
        """, (paper_name, ques_type, content, content_img,
              choice_a, choice_a_img, choice_b, choice_b_img,
              choice_c, choice_c_img, choice_d, choice_d_img, answer, rating))
